package y2016.date1012.pm.移位;

public class Yiwei {

    public static int zuoYiwei(int num, int count) {
        return num << count;
    }

    /**
     * @param num
     * @param count 移位数
     * @param flag  是否无符号移位
     * @return
     */
    public static int youYiwei(int num, int count, boolean flag) {
        if (flag) {
            return num >>> count;
        }
        return num >> count;
    }

}


